//F410101.js����ת�˻��

//===============================F410101.htm================================================
//!-- �л��˻�ʱ����ʾ��ͬ�����˻�
function accChanged(widget){
	if(widget.value=="14" || widget.value=="16" || widget.value=="22" || widget.value=="61"){
		tr_sub_acc.style.display="";
		menuChanged(widget,stepform.select_sub_acc);
	} else {
		tr_sub_acc.style.display="none";
	}
}

//������˻�
function menuChanged(p_widget,ch_widget){
	for (i=ch_widget.length-1; i>=0; i--){
		ch_widget.options[i] = null;
	}
	if(p_widget.value=="14"){
		ch_widget.options[0]=new Option("����� ���ڴ��� ��","14|0");
		ch_widget.options[1]=new Option("Ӣ�� ���ڴ��� ��","14|1");
		ch_widget.options[2]=new Option("��Ԫ ���ڴ��� ��","14|2");
		ch_widget.options[3]=new Option("��ʿ���� ���ڴ��� ��","14|3");
		ch_widget.options[4]=new Option("ŷԪ ���ڴ��� ��","14|4");
	} else if(p_widget.value=="16") {
		ch_widget.options[0]=new Option("����� ���ڴ��� ��","16|0");
		ch_widget.options[1]=new Option("����� �����ȡ ����� �� ��������: 20060515  ���: 1000","16|1");
		ch_widget.options[2]=new Option("����� �����ȡ һ�� �� ��������: 20060515  ���: 30000","16|2");
	} else if (p_widget.value=="22") {
		ch_widget.options[0]=new Option("����� �����ȡ һ�� �� ��������: 20050718  ���: 40000","22|0");
		ch_widget.options[1]=new Option("����� �����ȡ ����� �� ��������: 20060222  ���: 1003.42","22|1");
	} else if (p_widget.value=="61") {
	} else {
	}
	ch_widget.options[0].selected=true;
}

function meClick(widget){	
	if(widget.id=="checkbox2"){		
		enMessages(widget);
	}
}

// ����֪ͨ���� 0:δ��ͨ;1:��ͨ
var ENABLED="1";
function enMessages(widget){
	if(widget.checked && !(ENABLED=="1")){
		widget.checked=false;
		alert("����δ��ͨ������֪ͨ���������ڡ���ȫ���ġ����ŷ��񡱹����а��?ͨ��");
	} else if (widget.checked){
		tr_mobileMessage.style.display="";
		tr_mesgs_content.style.display="";
	} else {
		tr_mobileMessage.style.display="none";
		tr_mesgs_content.style.display="none";
	}
}

//�Ƿ��ڻ�ת
function enInnerTransfer(bool,widget){
	if(bool==false){
		tr_inner_trans.style.display="none";
	} else if(widget[0].checked){
		tr_inner_trans.style.display="";
	}
}

//onload�¼�
function loadStyle(){
	if(stepform.ISBACK.value=="1"){
		stepform.ISBACK.value=="0";
		accChanged(stepform.select_acc);
		//(stepform.booking);
		enMessages(stepform.checkbox2);
	} else {
		;
	}
}

//�Ƿ�ԤԼת��
function enBook(widget){
	if(widget.checked){
		tr_book_cont1.style.display="";
		tr_book_cont2.style.display="";
		if(stepform.timing[0].checked){
			enTiming(stepform.timing[0]);
		}else{
			enTiming(stepform.timing[1]);
		}
	} else {
		tr_book_cont1.style.display="none";
		tr_book_cont2.style.display="none";
	}
}

//ԤԼ��ʽ
function enTiming(widget){
	if(widget.value=='time'){
		stepform.startdate.disabled = false;
		startdate_link.href="javascript:ShowCalendar(document.forms[0].img1,document.forms[0].startdate,null,%20'8/1/1999',%20'1/22/2039')";
		document.getElementById('tip5').style.display="";
		document.getElementById('tip6').style.display="none";
		stepform.textfield6.disabled = true;
		stepform.degree.disabled = true;
	} else {
		stepform.startdate.disabled = true;
		startdate_link.href="#";
		document.getElementById('tip5').style.display="none";
		document.getElementById('tip6').style.display="";
		stepform.textfield6.disabled = false;
		stepform.textfield6.focus();
		stepform.degree.disabled = false;
	}
}

//��Ƶ�ʷ�ʽ
function enTimeType(widget){
	if(widget.value=="month"){
		stepform.textfield6.disabled = false;
		stepform.textfield6.focus();
		stepform.textfield7.disabled = true;
	} else {
		stepform.textfield6.disabled = true;
		stepform.textfield7.disabled = false;
		stepform.textfield7.focus();
	}
}

//��������������
function chkBounds(widget,ib,ub){
	if(widget.value<ib || widget.value>ub){
		alert("������볬����Χ������������"+ib+" �� "+ub+" ֮�䡣");
		widget.focus();
	}
}

//���ԤԼ���ڸ�ʽ�Ƿ���ȷ
function chkDate(widget,bool,ib){
	if(bool){
		if(widget.value.length<8){
			widget.focus();
			alert("���ڸ�ʽ����ȷ��");
			return false;
		}
		if(widget.value.substring(0,4)!="2006"||widget.value.substring(4,6)<"01"||widget.value.substring(4,6)>"12"||widget.value.substring(6,8)<"01"||widget.value.substring(6,8)>"31"){
			widget.focus();
			alert("���ڸ�ʽ����ȷ��");
			return false;
		}

		if(ib=="1"){
			var tod = new Date();
			tt=tod.getYear();
			if(tod.getMonth()+1<10){
				tt=tt+"0";
			}
			tt=tt+(tod.getMonth()+1);
			if(tod.getDate()<10){
				tt=tt+"0";
			}
			tt=tt+tod.getDate();
			if(widget.value<=tt){
				widget.focus();
				alert("ָ���Ľ������ڲ���С�ڻ���ڵ�ǰ���ڡ�");
			}
		}
	}
}

//����Ƿ����ת��
function chkMultiCurr(widget){
	if(widget.value!='14|0'){
		document.getElementById('tip2').innerHTML = "���ת��ʱ��ֻ��ת�뱾�������˻��������ĸ������˻������˱䶯������<a href=\"javascript:alert('��ȡ���˻���Ϣ�ɹ�');\"><b>����ȡ���˻���Ϣ��</a></b>��";
		document.getElementById('tip3').innerText = "���ֱ�Ӵӡ��տ�����ᡱ��ѡ�����еı��������տ��˻���Ϣ��";
	} else {
		document.getElementById('tip2').innerHTML = "�����ĸ������˻������˱䶯������<a href=\"javascript:alert('��ȡ���˻���Ϣ�ɹ�');\"><b>����ȡ���˻���Ϣ��</a></b>";
		document.getElementById('tip3').innerText = '�����ֱ�������˺ţ�Ҳ���Ե�����տ�����ᡱѡ������տ��˻�';
	}
}

//ҳ���ύ
function submitme(){
	stepform.ISBACK.value = "1";
	if(stepform.select_acc.value=="14"&&stepform.select_sub_acc.value!='14|0'&&stepform.accname.value!=''&&stepform.accname.value!='��XX'){
		alert('���ת��ʱ��ֻ��ת�뱾�������˻���');
		return false;
	}
	if(stepform.txtTranAmt.value.length>7&&stepform.txtTranAmt.value>"js6/tx/1,200.00"){
		document.location='js6/tx/F410102_1.htm';
	}else{
		document.location='js6/tx/F410102.htm';
	}
}


//===============================F410102.htm================================================
//ҳ���ύ
function confirmMe(){
	if(!password(textfield3,6,12))
		return false;
	if(textfield3.value.length%2==0){
		document.location='js6/tx/F410103.htm';
	} else {
		document.location='js6/tx/F410103_2.htm';
	}
}

//У������
function password(ps,low,high){
	if(ps.value.length==0){
		alert("�Բ��𣬽������벻��Ϊ�գ����������룡");
		ps.focus();
		return false;
	} else if (ps.value.length<low || ps.value.length>high) {
		alert("�Բ���������Ľ������볤�Ȳ������������룡");
		ps.focus();
		return false;
	} 
	return true;
}

//===============================F410102_1.htm================================================
//��ȡǩ��
function sign(){
	r = window.showModalDialog("js6/tx/signature.htm","","dialogWidth:419px;dialogHeight:315px;status:no;menubar:no;center:yes;help:no;resizable:no");
	return r;
}
function sign2(){
	r = window.showModalDialog("js6/tx/signature2.htm","","dialogWidth:314px;dialogHeight:170px;status:no;menubar:no;center:yes;help:no;resizable:no");
	return r;
}
//˫��ȷ��
/*function sslConfirmMe(){
	if(!password(textfield3,6,12))
		return false;
	if(sign()){
		if(textfield3.value.length%2==0){
			sign2();
			//document.location='js6/tx/signature2.htm';
		} else {
			sign2();
			//document.location='js6/tx/signature2.htm';
		}
	} else {
		alert("ǩ����ݴ���");
	}
}*/
function sslConfirmMe(){
	sign();
	sign2();
		}

//У��ǩ��
function chkSignature(){
	if ("GPLiep9L3hLemxeHExdaqszYjV8"!=window.opener.document.all.SIGN_STR.value){
		alert("ǩ����ݴ���");
		return false;
	}
	return true;
}


//===============================signature.htm================================================
//ȡ��֤��ѡ��
function cancleMe(){
	//window.opener.document.all.SIGN_STR.value="";
	returnValue=false;
	window.opener.document.all.cursor='hand';
	window.close();
}

//ѡ��֤��
function getSign(){
	//div_cert.style.display="none";
	//div_sign.style.display="";
	//window.opener.document.all.SIGN_STR.value="GPLiep9L3hLemxeHExdaqszYjV8";
	returnValue=true;
	window.close();
}

//����ǩ����Ϣ
function retSignature(){
	window.opener.document.all.SIGN_STR.value="GPLiep9L3hLemxeHExdaqszYjV8";
	window.close();
}


//===============================F410103.htm================================================
//��ӡ
function printResult(obj){
   obj.document.execCommand('Print',false);
}